package cn.fz.loop01;

import java.util.Scanner;

public class Demo01 {
    public static void main(String[] args) {
        System.out.println("请输入一个数：");
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int newNum = 0;
        while (num!=0) {
            int ge = num%10;
            num = num/10;
            newNum = newNum*10+ge;
            System.out.println(ge);
        }
        System.out.println("newNum="+newNum);
    }
}
